/**
 * @File name: modules/object.h
 * @Synopsis:
 * @Author: xing.dai@aliyun.com
 * @Version: 0.0.1
 * @Date: 2018-08-28 11:28
 */

#ifndef __OBJECT_H__
#define __OBJECT_H__

#include "list.h"

#define OBJECT_NAME_MAX     15

/* Object flag member. */
#define OBJ_MEM_STATIC	0x01 /* Alloc from static memory.*/

typedef enum _object_class_type {
    OBJECT_CLASS_DEVICE,
    OBJECT_CLASS_MAX,
} object_type_e;

typedef struct _object {
    node_t node;
    uint8 type;
    //uint8 flag;
    char   *name;
} object_t;

list_t *get_object_list(object_type_e type);
int object_init(object_t *object, object_type_e type, char *name);
//int object_attach(list_t *list, object_t *object, uint32 type, uint32 flag);

#endif

